package com.xigua.util;

import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;

/**
 * @author LiRongHua
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}
 * @date 2022/1/1922:23
 */
public class JedisUtil {
    private static JedisPool jedisPool;
    static {
        JedisPoolConfig config = new JedisPoolConfig();
        config.setMaxTotal(10);
        config.setMaxWaitMillis(30000);

        jedisPool = new JedisPool(config,"120.76.116.216",6379,3000,"xg123456");

    }

    public static Jedis getJedis(){
        return jedisPool.getResource();
    }


}
